package priv.ljh.operate.service.impl;

import org.springframework.stereotype.Service;
import priv.ljh.operate.entity.User;
import priv.ljh.operate.mapper.UserMapper;
import priv.ljh.operate.service.UserService;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;
    @Override
    public int register(String phone,String password) {
        return userMapper.register(phone, password);

    }
    @Override
    public User selectUser(String phone) {
        return userMapper.selectUser(phone);
    }

    @Override
    public int seleteId(String phone) {
        return userMapper.seleteId(phone);
    }

    @Override
    public int setSeller(String username, String identity, int id) {
        int seller=1;
        return userMapper.setSeller(username,identity,seller,id);
    }

    @Override
    public int updatePassword(String password, String phone) {
        return userMapper.updatePassword(password,phone);
    }

    @Override
    public int seleteSeller(String phone) {
        return userMapper.seleteSeller(phone);
    }
}